
                	<form action="schools.php">
                    
                    <table cellpadding="0" cellspacing="6">
                    
                    <tr><td width="140">
                    Coutry
                    </td><td>
                    <select class="inputbox" name="country_id" style="width:170px">	
                    <?php
					  $sql = "SELECT
							c.country_id,
							d.name AS country
						FROM
							cities AS c,
							countries AS d
						WHERE
							c.country_id = d.country_id
						GROUP BY
							c.country_id
						  ";
						$result = query($sql);
						while ($row_country = mysql_fetch_object($result)) {	  
					?>
						
						<option value="<?=$row_country->country_id?>" <?=(($row_country->country_id==235)?'selected':'')?> ><?=$row_country->country?></option>
						
					<?php
						} 
					 ?>	
                    </select>   
                    
                    </td></tr>
                    <tr><td>
                    Course type
                    </td><td>
                    <select class="inputbox" name="course_type_id" style="width:170px">
                    <?php
					  $sql = "SELECT
							course_type_id,
							name
						FROM
							course_types
						  ";
						$result = query($sql);
						while ($row_type = mysql_fetch_object($result)) {	  
					?>
						
						<option value="<?=$row_type->course_type_id?>" <?=(($row_type->course_type_id==3)?'selected':'')?> ><?=$row_type->name?></option>
						
					<?php
						} 
					 ?>	
                     </select>
                     
                     </td></tr>
                    <tr><td>
                    Duration
                    </td><td>
                     
                     <select class="inputbox" name="duration" style="width:170px">
                    <?php
					
						for ($i=1;$i<=12;$i++) {	  
					?>
						
						<option value="<?=$i?>" <?=(($i==2)?'selected':'')?> ><?=$i?> week<?=(($i>1)?"s":"")?> and up</option>
						
					<?php
						} 
					 ?>	
                     </select>
                     </td></tr>
                    <tr><td>&nbsp;
                    
                    </td><td>
                     
                     <input style="float:right; margin:5px 0 0" type="submit" class="button" value="Search"/>
                     
                     </td></tr>
                     </table>
                  </form>
